package Options;
import java.util.List;

import Sources.SourcesAdapter;
import System.Listener;

/**
 * CLI part of options contains the methods that used by options
 * @author Shinichi
 *
 */
public class Options {

	public SourcesAdapter mySources;
	public Listener myListener;//a pointer to Listener 
	protected List<String> sList;
	//-tells it when the  listening sources have changed
	public Options(SourcesAdapter source,Listener yourListener){
		System.out.println("Options Screen Created");
		myListener=yourListener;
		mySources=source;
		sList=source.dumpSource();
	}
	/**
	 * starts the system listening  of listener
	 */
	public void on() {
		myListener.listenningOn();
	}

	/**
	 * ends the system listening of listener
	 *
	 */
	public void off() {
		myListener.listenningOff();
	}

	/**
	 * Description of the method getSources.
	 *
	 */
	public void getSources() {
		sList=mySources.dumpSource();
	}

	/**
	 * Description of the method deleteSource.
	 *
	 */
	public void deleteSource(String what) {
		mySources.deleteSource(what);
	}
	
	/**
	 * @param what
	 * @param exp
	 */
	public void addSource(String what,String[] exp){
		mySources.insertSource(what,exp);
	}
	public void Open() {
	}
	
	/**
	 * @param from
	 * @param to
	 * @param exp
	 */
	public void setSource(String from,String to,String[] exp) {
		mySources.setSource(from, to,exp);
	}
	


}